<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<style>
body{cursor:default;margin:3;border:1px solid #000000;}
input{font-size:10px;font-family:Verdana;border:1px solid #000000;}
td{font-size:10px;font-family:Verdana}
select{font-size:10px;font-family:Verdana}
.button{background-color:transparent;}
</style>
<script>
	var parentObject		= null;
	var _jEditor			= null;
	var maxLine				= 1;
	var allowKill			= true;

	window.onfocus			= resize;
	


	function cleanup()
	{	
		var len				= 0;
		var removed			= 0;
		var removedTags		= [];
		if(theTag.value!='' && theTag.value.toUpperCase()!='BODY' && theTag.value.toUpperCase()!='HTML')
		{
			len				= _jEditor.editControl.DOM.all.tags(theTag.value).length;
			for(var i=0;i<len;i++)
			{
				var curTag	= _jEditor.editControl.DOM.all.tags(theTag.value)[i];
				if(theProperty.value!='' && curTag.getAttribute(theProperty.value)!=null &&  curTag.getAttribute(theProperty.value).toLowerCase()==theValue.value.toLowerCase())
				{
					removedTags[removedTags.length]		= curTag;
					removed++;
				}
			}
			for(var i=0;i<removedTags.length;i++)
			{
				removedTags[i].removeNode(checkbox.checked);
			}
		}
		kill();
		alert((removed==0?'None':removed)+' tags removed.');
	}

	function kill()
	{
		if(parentObject!=null && parentObject.parentElement)
		{
			parentObject.parentElement.activeState	= false;
			parentObject.parentElement.buttonState	= 'out';
			parentObject.style.visibility			= 'hidden';
			theTag.blur();
		}
	}

	function resize()
	{	

		if(parentObject.className=='menutop')
		{
			var tempBottom			= parentObject.offsetHeight+parentObject.offsetTop;
		}
		parentObject.style.width	= document.body.scrollWidth+1;
		parentObject.style.height	= document.body.scrollHeight+1;

		if(parentObject.className=='menutop')
		{
			parentObject.style.pixelTop			= tempBottom-parentObject.offsetHeight;
		}



		theTag.select();
		theTag.focus();

	}

	function public_init(e)
	{
		parentObject				= e;
		_jEditor					= parent.document.all(e.ancestor);
		self.focus();
	}

</script>
</HEAD>

<BODY>
<TABLE border=0 cellspacing=0 cellpadding=3 id=iTable width=200>
<tr>
<td valign=top>Tag:</td>
<td><input type=text id=theTag value="font" onkeydown="if(event.keyCode==13)cleanup()" style="width:116"></td>
</tr>
<tr>
<td valign=top>Property:</td>
<td><input type=text id=theProperty value="size" onkeydown="if(event.keyCode==13)cleanup()" style="width:50"> = <input type=text id=theValue value="3" onkeydown="if(event.keyCode==13)cleanup()" style="width:50"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type=checkbox id=checkbox style="border:0;margin:-2"> <label for=checkbox>Remove Contont</label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type=button onclick=cleanup() value=Clean class=button onmouseover="allowKill=false" onmouseout="allowKill=true"> <input type=button onclick=kill() value=Cancel class=button onmouseover="allowKill=false" onmouseout="allowKill=true"></td>
</tr>
</TABLE>
</BODY>
</HTML>
